package com.qf.service.impl;

import com.qf.entity.District;
import com.qf.mapper.DistrictMapper;
import com.qf.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/10/4 16:41
 */

@Service
public class DistrictServiceImpl implements DistrictService {

    @Autowired
    DistrictMapper districtMapper;

    @Override
    @Transactional(rollbackFor = Throwable.class)
    public List<District> findAll() {
        List<District> districts = districtMapper.selectByExample(null);
        return districts;
    }
}
